<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Grade extends Model
{
    use SoftDeletes;

    public $table = 'grades';

    public $fillable = [
        'name'
    ];

    /**
     * @param $id
     * @return mixed
     */
    public static function getName($id)
    {
        $model = self::query()->where('id', $id)->first();
        return $model->name;
    }
}
